package windbell.domain.risk.impl;

import edu.fudan.mylang.pf.BaseDAOService;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.stereotype.Service;
import windbell.domain.risk.RiskCategory;
import windbell.domain.risk.RiskSubCategory;
import windbell.domain.risk.RiskSubCategoryDAO;
import windbell.domain.risk.impl.RiskSubCategoryImpl;

@Service("windbell.domain.risk.RiskSubCategoryDAO")
public class RiskSubCategoryDAOImpl extends BaseDAOService<RiskSubCategory> implements RiskSubCategoryDAO {
  public RiskSubCategory create(final RiskCategory category, final Procedure1<? super RiskSubCategory> init) {
    RiskSubCategory riskSubCategory=RiskSubCategoryImpl.create(category,getObjectFactory());
    
    final Procedure1<RiskSubCategory> _function = new Procedure1<RiskSubCategory>() {
        public void apply(final RiskSubCategory it) {
          init.apply(it);
        }
      };
    RiskSubCategory _doubleArrow = ObjectExtensions.<RiskSubCategory>operator_doubleArrow(riskSubCategory, _function);
    return _doubleArrow;
  }
}
